﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NicoView.Model.Service.Comments.BodyTexts
{
    /// <summary>
    /// コマンドテキスト
    /// </summary>
    public class NicoCommentCommandBodyText : INicoCommentBodyText
    {


        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="text"></param>
        public NicoCommentCommandBodyText(string text)
        {
            Text = text;
        }


        /// <summary>
        /// URLとして取得
        /// </summary>
        /// <returns></returns>
        public string AsUrl()
        {
            throw new NotSupportedException();
        }


        /// <summary>
        /// 子テキストを取得
        /// </summary>
        public ICollection<INicoCommentBodyText> ChildTexts
        {
            get { throw new NotSupportedException(); }
        }

        /// <summary>
        /// ユーザ名を取得
        /// </summary>
        /// <returns></returns>
        public string GetUserName()
        {
            throw new NotSupportedException();
        }


        /// <summary>
        /// アンカを取得
        /// </summary>
        /// <returns></returns>
        public int GetAnchor()
        {
            throw new NotSupportedException();
        }

        /// <summary>
        /// 複数アンカを取得
        /// </summary>
        /// <returns></returns>
        public Tuple<int, int> GetRangeAnchor()
        {
            throw new NotSupportedException();
        }

        /// <summary>
        /// テキスト属性を取得
        /// </summary>
        public NicoCommentBodyTextType BodyType
        {
            get { return NicoCommentBodyTextType.Command; }
        }

        /// <summary>
        /// テキスト文字列を取得
        /// </summary>
        public string Text
        {
            get;
            private set;
        }

        /// <summary>
        /// 表示用テキスト文字列を取得
        /// </summary>
        public string DisplayText
        {
            get { return Text; }
        }


        public bool HasUrl
        {
            get { return false; }
        }


        public bool HasCurrentBodyText
        {
            get { return true; }
        }


        public bool HasChildBodyTexts
        {
            get { return false; }
        }

        public bool HasUserName
        {
            get { return false; }
        }

        public bool IsCommand
        {
            get { return true; }
        }


        public bool IsUserShowCommand
        {
            get { return false; }
        }

        public bool IsOwnerShowCommand
        {
            get { return false; }
        }
    }
}
